﻿#ifndef ADMINUI_H
#define ADMINUI_H

#include <QMainWindow>
#include <QMessageBox>
#include <QSqlTableModel>
#include <QSqlDatabase>

namespace Ui {
class adminUI;
}

class adminUI : public QMainWindow
{
    Q_OBJECT

public:
    explicit adminUI(QSqlDatabase* db,QWidget *parent = nullptr);
    ~adminUI();

private slots:
    void on_btnAppendSick_clicked();

    void on_actSick_triggered();

    void on_actDoctor_triggered();

    void on_actCase_triggered();

    void on_actReserve_triggered();

    void on_actFeedback_triggered();

    void on_btnDeleteSick_clicked();

    void on_btnResetSick_clicked();

    void on_btnSubmitSick_clicked();

    void on_btnAppendDoctor_clicked();

    void on_btnDeleteDoctor_clicked();

    void on_btnResetDoctor_clicked();

    void on_btnSubmitDoctor_clicked();

    void on_btnAppendCase_clicked();

    void on_btnDeleteCase_clicked();

    void on_btnResetCase_clicked();

    void on_btnSubmitCase_clicked();

    void on_btnAppendReserve_clicked();

    void on_btnDeleteReserve_clicked();

    void on_btnResetReserve_clicked();

    void on_btnSubmitReserve_clicked();

    void on_btnAppendFeedback_clicked();

    void on_btnDeleteFeedback_clicked();

    void on_btnResetFeedBack_clicked();

    void on_btnSubmitFeedback_clicked();

private:
    Ui::adminUI *ui;

    QSqlDatabase m_db;//数据库连接
    QSqlTableModel* m_sickModel;//病人数据模型
    QSqlTableModel* m_doctorModel;//医生数据模型
    QSqlTableModel* m_caseModel;//病例数据模型
    QSqlTableModel* m_reserveModel;//预约数据模型
    QSqlTableModel* m_feedbackModel;//反馈数据模型

    void ini();//初始化
};

#endif // ADMINUI_H
